@import "../bootstrap/variables.less";
@import "../bootstrap/mixins.less";
@import "../adminlte/variables.less";
@import "../adminlte/mixins.less";

body {
  &.layout-boxed {    
    background-image: none;
    background-color: @body-bg;

    .top-banner {
      background-color: @brand-primary;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 80px;
    }
    
    &.no-gutter {
      .top-banner {
        height: 50px;
      }
    }
  
    .wrapper {
      box-shadow: none;
      border: none; 
    }
      
    .bottom-wrapper {
      border: none;
      background: transparent;
    }  
  }
  
  &.layout-top-nav {
    .content-wrapper,
    .main-footer {
      border-left: none;
    }
    
    .main-header > .navbar {
        /* make space for logo, even when no sidebar */
        margin-left: 230px;
        
        @media (max-width: @screen-header-collapse) {
          margin-left: 0;
        }
    }
  }
}

h5, h6 {
  font-weight: 600;
}

h1 {
	font-weight: bold;
}

.content-header > h1 > small {
  font-size: @font-size-h3;
}

@media (max-width: @screen-header-collapse) {
  body.layout-boxed {  
    .wrapper {
      border-left: none;
      border-right: none;
    }
    
    .main-sidebar {
      width: @sidebar-width - 1px;
    }
    
    .main-sidebar, .left-side {
      padding-top: 50px;
    }
    
    .wrapper {      
      border-radius: 0;
    }
    
    .content-wrapper,
    .main-footer {
      margin-left: -1px;
    }
  }
}


//Navbar
.main-header {    
  background-color: @brand-primary;
    
  .navbar {
    .navbar-variant(@brand-primary; #fff);
    .sidebar-toggle {
      color: #fff;
      &:hover {
        background-color: darken(@brand-primary, 5%);
      }
    }
    .navbar-toggle
    {
      font-family: "fontAwesome";
      &:before {
        content: "\f0c9";
      }
    }
    @media (max-width: @screen-header-collapse) {
      .dropdown-menu {
        li {
          &.divider {
            background-color: rgba(255, 255, 255, 0.1);
          }
          a {
            color: #fff;
            &:hover {
              background: darken(@brand-primary, 5%);
            }
          }
        }
      }
    }
  }

  //Logo
  .logo {
    .logo-variant(@brand-primary);
    @media (max-width: @screen-header-collapse) {
      position: absolute;
      top: 0;
      z-index: 1001;
      background-color: transparent;
      width: 170px;
      left: 50%;
      margin-left: -85px;
      padding: 0;
      
      & .logo-lg {
        width: 170px;
      }
    }
  }

  li.user-header {
    background-color: @brand-primary;
  }
}
  
.wrapper, .layout-boxed .wrapper {
  margin-bottom: 30px;
}
  
//Content Header
.content-header {
  background: transparent;
  padding-top: 0;
  
  h1 {
    font-size: floor((@font-size-base * 2.6));
    background-color: #f4f4f4;
    padding: 8px 16px;
    .border-radius(@border-radius-large);
    border-bottom: 2px solid #ddd;   
  }
}

.content,
.content-header {
  padding-left: 30px;
  padding-right: 30px;
}

.content h1 {
  color: lighten(@brand-primary, 10%);
  font-style: italic;
}

//Create the sidebar skin
.skin-light-sidebar(@brand-primary);

.sidebar {
  padding: 30px 12px 0 12px;
}

.sidebar-menu {
  &,
  li,
  li a {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;    
    border: none;       
  }
  
  li {        
    position: relative;
  }

  & > li > a {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 24px;
  }

  li a:link,
  li a:visited,
  li a:active {
    color: @gray-dark;
  }
  li a:hover {
    color: @brand-primary;
  }
  
  li.treeview.active > a,
  & > li.treeview.active > a,
  li.treeview.active:hover > a,
  & > li.treeview.active:hover > a,
  li:hover > a,
  & > li:hover > a,
  li.active > a,
  & > li.active > a,
  li.active:hover > a,
  & > li.active:hover > a
  {
      background: transparent;
  }
      
  li.selected
  {
      background-color: lighten(@brand-primary, 50%);
      .border-radius(@border-radius-large);

      & > a
      {        
        background-color: @brand-primary !important;
        color: white;
        font-weight: 600;
        
        &:link,
        &:visited,
        &:active,
        &:hover {
          color: white;
        }     
      }    
        
  }
  
  /* Expander */
  li > a.expand
  {
    position: absolute;
    left: -18px;
    top: 2px;
    font-size: 18px;

    /* Font Awesome */
    margin-left: .3em;
    display: inline-block;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    &:before {
      content: "\f0da";
    }
  }
  li.active > a.expand,
  {    
    top: -4px;
    left: -10px;
    padding-top: 0;
    .rotate(90deg);
  }

  .treeview-menu,    
  .treeview-menu .treeview-menu
  {
    padding-left: 18px;
  }
        
  li.divider {
      padding-top: 18px;
      border-bottom: 1px solid @gray-lighter;
      margin-bottom: 18px;
  }
  
  li.header {
    text-transform: uppercase;
    font-size: @font-size-base;
    font-weight: 600; 
    color: @gray;       
    background-color: transparent;
    border: none;   
  }           

  .treeview-menu > li > a,
  .treeview-menu > li.header
  {
    padding-left: 18px;
  } 

  & > li > .treeview-menu
  {
    background-color: transparent;
  }
} 
    
.table-striped tr
{
    background-color: #f9fafc;
}

.table thead tr
{
    background-color: @brand-primary;
    color: #fff;
}

.box
{
    border-top-color: darken(@brand-primary, 10%);    
}
      
.main-header,  
.main-footer
{
  margin-bottom: 30px;
}

&.no-gutter .main-header
{
  margin-bottom: 0px;
}

.main-footer
{
  border-top: none;
}
    
.bottom-footer {
  text-align: center;
}

.wrapper,
.content-wrapper,
.main-sidebar,
.left-side,
.right-side {
  background-color: white;
}

.layout-top-nav .main-header > .logo {
  .logo-variant(@brand-primary);
}

hr {
    border-top-color: #B5BBC8;
}

.lead {
    padding: 10px 20px;
    margin: 0 0 20px;
    border-left: 5px solid @brand-primary;
}

.three-cols th,
.three-cols td {
	width: 30%;
}

.two-cols th,
.two-cols td {
    width: 60%;
}

.two-cols th:last-child,
.two-cols td:last-child,
.three-cols th:last-child,
.three-cols td:last-child {
	width: 40%;
}

.two-cols-alt th,
.two-cols-alt td {
    width: 30%;
}

.two-cols-alt th:last-child,
.two-cols-alt td:last-child {
	width: 70%;
}

.larger {
    font-size: @font-size-large;
}

.smaller {
    font-size: @font-size-small;
}

.content-header > hr {
    margin-bottom: 0;
}

dl,
dl ul,
dl ol,
.box-body dl,
.box-body.lead {
	margin-bottom: 0;
}

.paramref, .typeparamref {
	font-style: italic;
}

.table-responsive {
  border: none;
}

/* IE doesn't recognize <wbr> - http://stackoverflow.com/a/23759279/807064 */
wbr:after { content: "\00200B"; }

/* Infobar */

.infobar {
  padding: 30px 12px 0 12px
}

.affix {
    position: relative;
}

@media only screen and (max-width: 1249px)
{
  .wyam .sidebar {
    padding-top: 0;
  }
}

@media only screen and (min-width: 1250px)
{
  .infobar {
    padding: 18px;
    position: absolute;
    left: 1250px;
    top: 80px;
    width: 230px;
    
    &.affix {
      top: 20px;
      position: fixed;
      left: auto;
      margin-left: 1250px;
    }
  }

  .infobar-hidden {
    display: none;
  }

  .wrapper.with-container {
    overflow: visible;
  }      
}

@media only screen and (max-width: 1670px) and (min-width: 1250px) {
  .wrapper.with-container {
    max-width: 1020px;
    left: -115px;
  }

  .infobar {
    padding: 18px;
    position: absolute;
    left: 1020px;
    top: 80px;
    width: 230px;

    &.affix {
      top: 20px;
      position: fixed;
      left: auto;
      margin-left: 1020px;
    }
  }
}

/* Back to top */
#return-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: block;
    text-decoration: none;
    .border-radius(35px);
    display: none;
}
#return-to-top i {
    color: #fff;
    margin: 0;
    position: relative;
    left: 16px;
    top: 13px;
    font-size: 19px;
}
#return-to-top:hover {
    background: rgba(0, 0, 0, 0.9);
}
#return-to-top:hover i {
    color: #fff;
}

/* Code styles */
pre {
    padding: 0px;
    margin: 0 0 8px 0;
    overflow: auto;
    word-wrap: normal;
    word-break: normal;
    border-color: #ddd;
    font-size: 12px;
}

code a {
  color: inherit;
}

/* Mermaid */
.mermaid {
  overflow: hidden !important;
  visibility: hidden !important;
  &[data-processed="true"] {
    visibility: visible !important;
  }
  min-height: 200px;

  svg {
    min-height: 200px;
  }
}
.node rect,
.node circle,
.node ellipse,
.node polygon {
  fill: lighten(@brand-primary, 50%) !important;
  stroke: #000 !important;
}
.type-node rect,
.type-node circle,
.type-node ellipse,
.type-node polygon {
  fill: lighten(@brand-primary, 30%) !important;
  stroke: #000 !important;
}
.cluster rect {
  fill: #f3f3f3 !important;
  stroke: #ddd !important;
}

/* Turbolinks */
.turbolinks-progress-bar {
  background-color: @brand-primary !important;
}